/*
 * CS_REQ_PHYSICAL_CHANGE.cpp
 *
 *  Created on: 2013. 11. 9.
 *      Author: the2
 */



#include "../../Command.h"

#include "../../User.h"

#include "../../NLogic/Static.h"
#include "../../NState/Static.h"

namespace ProjectZ { namespace NCommand {
/*
// 물리적(서버) 채널 변경
CS_REQ_PHYSICAL_CHANGE		0x0218
{
}

SC_RES_PHYSICAL_CHANGE		0x0219
{
	s16	ack;	//응답
}
 */
void Command::CS_REQ_PHYSICAL_CHANGE(User * pUser, ::Network::Packet * pPacket)
{
	PREPARE_PACKET;

	::Network::Packet * pAck = ::Network::GETPACKETPOOL()->SEND_NEW();

	* pAck << static_cast<int16_t>(ACK_OK);

	pAck->MakePacket(CMD_SC_RES_PHYSICAL_CHANGE);
	pUser->Send(pAck);

	pUser->SetState(NState::Static::InstancePtr()->PHYSICALCHANGE());
	pUser->PhysicalChangeCleanUp();

//	pUser->SetEnumState(User::EnumState::PHYSICAL_CHANGE);
}

} /*NCommand*/ } /*ProjectZ*/

